home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Entertainment / MacMud / Unix / rpc⁄pmap_prot.h < prev    next >
Encoding:
Text File  |  1990-04-09  |  2.0 KB  |  69 lines  |  [TEXT/????]

  1. /*    @(#)pmap_prot.h 1.1 86/09/24 SMI    */
  2.  
  3. /*
  4.  * pmap_prot.h
  5.  * Protocol for the local binder service, or pmap.
  6.  *
  7.  * Copyright (C) 1984, Sun Microsystems, Inc.
  8.  *
  9.  * The following procedures are supported by the protocol:
  10.  *
  11.  * PMAPPROC_NULL() returns ()
  12.  *     takes nothing, returns nothing
  13.  *
  14.  * PMAPPROC_SET(struct pmap) returns (bool_t)
  15.  *     TRUE is success, FALSE is failure.  Registers the tuple
  16.  *    [prog, vers, prot, port].
  17.  *
  18.  * PMAPPROC_UNSET(struct pmap) returns (bool_t)
  19.  *    TRUE is success, FALSE is failure.  Un-registers pair
  20.  *    [prog, vers].  prot and port are ignored.
  21.  *
  22.  * PMAPPROC_GETPORT(struct pmap) returns (unsigned long).
  23.  *    0 is failure.  Otherwise returns the port number where the pair
  24.  *    [prog, vers] is registered.  It may lie!
  25.  *
  26.  * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
  27.  *
  28.  * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
  29.  *     RETURNS (port, string<>);
  30.  * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
  31.  *     Calls the procedure on the local machine.  If it is not registered,
  32.  *    this procedure is quite; ie it does not return error information!!!
  33.  *    This procedure only is supported on rpc/udp and calls via
  34.  *    rpc/udp.  This routine only passes null authentication parameters.
  35.  *    This file has no interface to xdr routines for PMAPPROC_CALLIT.
  36.  *
  37.  * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
  38.  */
  39.  
  40. #define PMAPPORT        ((u_short)111)
  41. #define PMAPPROG        ((u_long)100000)
  42. #define PMAPVERS        ((u_long)2)
  43. #define PMAPVERS_PROTO        ((u_long)2)
  44. #define PMAPVERS_ORIG        ((u_long)1)
  45. #define PMAPPROC_NULL        ((u_long)0)
  46. #define PMAPPROC_SET        ((u_long)1)
  47. #define PMAPPROC_UNSET        ((u_long)2)
  48. #define PMAPPROC_GETPORT    ((u_long)3)
  49. #define PMAPPROC_DUMP        ((u_long)4)
  50. #define PMAPPROC_CALLIT        ((u_long)5)
  51.  
  52. struct pmap {
  53.     unsigned long pm_prog;
  54.     unsigned long pm_vers;
  55.     unsigned long pm_prot;
  56.     unsigned long pm_port;
  57. };
  58.  
  59. extern bool_t xdr_pmap();
  60.  
  61. struct pmaplist {
  62.     struct pmap    pml_map;
  63.     struct pmaplist *pml_next;
  64. };
  65.  
  66. #ifndef KERNEL
  67. extern bool_t xdr_pmaplist();
  68. #endif /*!KERNEL*/
  69.